package org.PISS.controller.model;

import org.hibernate.annotations.GenericGenerator;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import java.math.BigDecimal;

/**
 * Created with IntelliJ IDEA.
 * User: mafi0813
 * Date: 22.04.14
 * Time: 14:05
 * To change this template use File | Settings | File Templates.
 */
@Entity
public class MoneyField implements Field {
    @Id
    @Column(name = "MONEY_ID")
    @GenericGenerator(name="generator", strategy="increment")
    @GeneratedValue(generator="generator")
    private long id;
    @Column(name = "PRODUCT_ID")
    private long productId;
    @Column(name = "FIELDSET_ID")
    private long fieldsetId;
    @Column
    private BigDecimal description;

    public MoneyField(){
        super();
    }
    public MoneyField(long id, long productId, long fieldsetId, BigDecimal description){
        this.id=id;
        this.productId=productId;
        this.fieldsetId = fieldsetId;
        this.description=description;
    }

    @Override
    public long getId() {
        return this.id;
    }

    @Override
    public long getProductId() {
        return productId;
    }

    @Override
    public Object getDescription() {
        return description;
    }

    public void setDescription(BigDecimal description) {
        this.description = description;
    }

    public void setId(long id) {
        this.id = id;
    }

    public void setProductId(long productId) {
        this.productId = productId;
    }

    @Override
    public long getFieldsetId() {
        return fieldsetId;
    }

    public void setFieldsetId(long fieldsetId) {
        this.fieldsetId = fieldsetId;
    }
}
